next up previous contents index
Next: External functions Up: Using functions and procedures Previous: Function overloading

forward defined functions

You can define a function without having it followed by it's implementation, by having it followed by the forward procedure. The effective implementation of that function must follow later in the module.

The function can be used after a forward declaration as if it had been implemented already.

The following is an example of a forward declaration.
listing4194

You cannot define a function twice as forward (nor is there any reason why you would want to do that).

Likewise, in units, you cannot have a forward declared function of a function that has been declared in the interface part. The interface declaration counts as a forward declaration.

The following unit will give an error when compiled:
listing4197


next up previous contents index
Next: External functions Up: Using functions and procedures Previous: Function overloading

Michael Van Canneyt
Fri Sep 25 09:15:40 MEST 1998